# Contributor: Dhruvin Gandhi <contact@dhruvin.dev>
# Maintainer: Dhruvin Gandhi <contact@dhruvin.dev>
pkgname=reuse
pkgver=3.0.2
pkgrel=0
pkgdesc="Tool for compliance with the REUSE recommendations"
url="https://reuse.software"
arch="noarch"
license="Apache-2.0 AND CC-BY-SA-4.0 AND CC0-1.0 AND GPL-3.0-or-later"
depends="
	py3-binaryornot
	py3-boolean.py
	py3-debian
	py3-jinja2
	py3-license-expression
	"
makedepends="py3-poetry-core py3-gpep517 py3-installer"
checkdepends="py3-pytest py3-pytest-xdist"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/r/reuse/reuse-$pkgver.tar.gz"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest -n auto
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/reuse*.whl
}

sha512sums="
3ed6f46a13eb84270e23736034c787e2b1d99766d8e0a996373201a4f8f02ee4f15c12c27da445be5820e7ac27d7fc4b2eafb35145792501082dd852183f60aa  reuse-3.0.2.tar.gz
"
